<html>
<head><meta charset="utf-8"><title>test coverage · project-const-generics · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/index.html">project-const-generics</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html">test coverage</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="213770301"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/213770301" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#213770301">(Oct 19 2020 at 11:12)</a>:</h4>
<p>considering that we nearly finished the implementation we should spend some time looking into improving our test coverage. My basic idea would be to create a list of interesting situations and cases and then write tests for possible combinations.</p>
<p>niko mentioned that <a class="stream" data-stream-id="187312" href="/#narrow/stream/187312-wg-async-foundations">#wg-async-foundations</a> also did some systematic testing before stabilization which I would like to know more about. <span class="user-mention" data-user-id="116009">@nikomatsakis</span> <span class="user-mention" data-user-id="116883">@tmandry</span> do you have some resources on how you did this or do you have the time to give a short summary of your approach?</p>



<a name="213791857"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/213791857" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#213791857">(Oct 19 2020 at 14:17)</a>:</h4>
<p><span class="user-mention" data-user-id="216206">@lcnr</span> yeah I mean we basically just sat down and wrote out the areas we'd like to test</p>



<a name="213791889"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/213791889" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#213791889">(Oct 19 2020 at 14:18)</a>:</h4>
<p>if you like I would enjoy scheduling an hour for us to sit and do this together</p>



<a name="213791940"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/213791940" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#213791940">(Oct 19 2020 at 14:18)</a>:</h4>
<p>in particular I think it'd be helpful to me to get my head wrapped around the scope of this project</p>



<a name="213791961"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/213791961" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#213791961">(Oct 19 2020 at 14:18)</a>:</h4>
<p>I've been wanting to come and check back in</p>



<a name="213794004"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/213794004" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> boats <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#213794004">(Oct 19 2020 at 14:31)</a>:</h4>
<p>maybe we should schedule time at a lang meeting to get an update on the state of this project?</p>



<a name="213821768"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/213821768" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#213821768">(Oct 19 2020 at 17:52)</a>:</h4>
<p>yes to both <span class="user-mention silent" data-user-id="116009">nikomatsakis</span> and <span class="user-mention silent" data-user-id="256759">boats</span> :)</p>
<p>Will have the last exam of this semester on the 28th so after that I should be able to focus on rust again</p>



<a name="213840183"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/213840183" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#213840183">(Oct 19 2020 at 20:23)</a>:</h4>
<p>I feel like preparing the test suite might be a useful precursor to updating the lang team, but <span class="user-mention" data-user-id="216206">@lcnr</span> do you think it'd make more sense to try and do an update before then?</p>



<a name="213840431"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/213840431" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#213840431">(Oct 19 2020 at 20:24)</a>:</h4>
<p>preparing the test suite would allow us to more precisely know what we are stabilizing, so doing so before updating the lang team does make sense to me</p>



<a name="213840992"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/213840992" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#213840992">(Oct 19 2020 at 20:29)</a>:</h4>
<p>preparing the test suite probably doesn't take too much time so while I feel like it isn't strictly necessary I do prefer first thinking about missing tests to then "officially" update the lang team</p>



<a name="214099104"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214099104" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214099104">(Oct 21 2020 at 19:05)</a>:</h4>
<p>I'm wondering whether this is something we can get help with (e.g. @jacobchrismarsh in <a href="https://github.com/rust-lang/rust/issues/74878">https://github.com/rust-lang/rust/issues/74878</a>).</p>



<a name="214099152"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214099152" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214099152">(Oct 21 2020 at 19:05)</a>:</h4>
<p>I was trying to work out what issues to get someone started with, but since <code>min_const_generics</code> is the focus right now, it'd be good to get any assistance with that.</p>



<a name="214099244"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214099244" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214099244">(Oct 21 2020 at 19:06)</a>:</h4>
<p>But then it might be tricky to work out what sort of tests are useful without understanding how it works.</p>



<a name="214121670"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214121670" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214121670">(Oct 21 2020 at 22:13)</a>:</h4>
<p>yeah, maybe we can get some help with actually writing the relevant tests once we figured out what we want to look out for?</p>



<a name="214121781"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214121781" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214121781">(Oct 21 2020 at 22:14)</a>:</h4>
<p>but I feel that there aren't any easy <code>min_const_generics</code>issues anymore <span aria-label="thinking" class="emoji emoji-1f914" role="img" title="thinking">:thinking:</span></p>



<a name="214122858"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214122858" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214122858">(Oct 21 2020 at 22:26)</a>:</h4>
<p>Yeah, I was going to look at some of the <code>A-const-generics</code> issues to see if there are some easy ones there.</p>



<a name="214192196"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214192196" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214192196">(Oct 22 2020 at 14:09)</a>:</h4>
<p><span class="user-mention" data-user-id="216206">@lcnr</span> do you have time today/tomorrow? I guess I can privmsg you</p>



<a name="214339441"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214339441" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214339441">(Oct 23 2020 at 17:06)</a>:</h4>
<p>(fyi <span class="user-mention" data-user-id="216206">@lcnr</span> and I are chatting over zoom, let me know if you'd want to join)</p>



<a name="214339615"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214339615" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214339615">(Oct 23 2020 at 17:08)</a>:</h4>
<p><span class="user-mention" data-user-id="216206">@lcnr</span> <a href="https://hackmd.io/WnFmN4MjRCqAjGmYfYcu2A">hackmd url</a></p>



<a name="214343438"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214343438" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214343438">(Oct 23 2020 at 17:40)</a>:</h4>
<p>I don't think I can join right now, but just noting a few more situations that need to be considered:</p>
<ul>
<li>rustdoc</li>
<li>macros</li>
<li>cross-crate</li>
</ul>



<a name="214351769"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214351769" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214351769">(Oct 23 2020 at 18:49)</a>:</h4>
<p>we didn't think about deeply nested unsize coercions <span aria-label="laughing" class="emoji emoji-1f606" role="img" title="laughing">:laughing:</span></p>



<a name="214351784"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214351784" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214351784">(Oct 23 2020 at 18:50)</a>:</h4>
<p>at least 1 tests breaks because of an actual issue when stabilizing min const generics with lazy norm</p>



<a name="214351898"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214351898" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214351898">(Oct 23 2020 at 18:50)</a>:</h4>
<p>What goes wrong?</p>



<a name="214351939"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214351939" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214351939">(Oct 23 2020 at 18:51)</a>:</h4>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="c1">// run-pass</span>
<span class="c1">// Issue 36278: On an unsized struct with &gt;1 level of nontrivial</span>
<span class="c1">// nesting, ensure we are computing dynamic size of prefix correctly.</span>

<span class="k">use</span><span class="w"> </span><span class="n">std</span>::<span class="n">mem</span><span class="p">;</span><span class="w"></span>

<span class="k">const</span><span class="w"> </span><span class="n">SZ</span>: <span class="kt">usize</span> <span class="o">=</span><span class="w"> </span><span class="mi">100</span><span class="p">;</span><span class="w"></span>
<span class="k">struct</span> <span class="nc">P</span><span class="o">&lt;</span><span class="n">T</span>: <span class="o">?</span><span class="nb">Sized</span><span class="o">&gt;</span><span class="p">([</span><span class="kt">u8</span><span class="p">;</span><span class="w"> </span><span class="n">SZ</span><span class="p">],</span><span class="w"> </span><span class="n">T</span><span class="p">);</span><span class="w"></span>

<span class="k">type</span> <span class="nc">Ack</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">P</span><span class="o">&lt;</span><span class="n">P</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;&gt;</span><span class="p">;</span><span class="w"></span>

<span class="k">fn</span> <span class="nf">main</span><span class="p">()</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="kd">let</span><span class="w"> </span><span class="n">size_of_sized</span><span class="p">;</span><span class="w"> </span><span class="kd">let</span><span class="w"> </span><span class="n">size_of_unsized</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="kd">let</span><span class="w"> </span><span class="n">x</span>: <span class="nb">Box</span><span class="o">&lt;</span><span class="n">Ack</span><span class="o">&lt;</span><span class="p">[</span><span class="kt">u8</span><span class="p">;</span><span class="w"> </span><span class="mi">0</span><span class="p">]</span><span class="o">&gt;&gt;</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">Box</span>::<span class="n">new</span><span class="p">(</span><span class="n">P</span><span class="p">([</span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">SZ</span><span class="p">],</span><span class="w"> </span><span class="n">P</span><span class="p">([</span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">SZ</span><span class="p">],</span><span class="w"> </span><span class="p">[</span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="mi">0</span><span class="p">])));</span><span class="w"></span>
<span class="w">    </span><span class="n">size_of_sized</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">mem</span>::<span class="n">size_of_val</span>::<span class="o">&lt;</span><span class="n">Ack</span><span class="o">&lt;</span><span class="n">_</span><span class="o">&gt;&gt;</span><span class="p">(</span><span class="o">&amp;</span><span class="n">x</span><span class="p">);</span><span class="w"></span>
<span class="w">    </span><span class="kd">let</span><span class="w"> </span><span class="n">y</span>: <span class="nb">Box</span><span class="o">&lt;</span><span class="n">Ack</span><span class="o">&lt;</span><span class="p">[</span><span class="kt">u8</span><span class="w">   </span><span class="p">]</span><span class="o">&gt;&gt;</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">x</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="n">size_of_unsized</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">mem</span>::<span class="n">size_of_val</span>::<span class="o">&lt;</span><span class="n">Ack</span><span class="o">&lt;</span><span class="n">_</span><span class="o">&gt;&gt;</span><span class="p">(</span><span class="o">&amp;</span><span class="n">y</span><span class="p">);</span><span class="w"></span>
<span class="w">    </span><span class="n">assert_eq</span><span class="o">!</span><span class="p">(</span><span class="n">size_of_sized</span><span class="p">,</span><span class="w"> </span><span class="n">size_of_unsized</span><span class="p">);</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="214351970"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214351970" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214351970">(Oct 23 2020 at 18:51)</a>:</h4>
<div class="codehilite"><pre><span></span><code>error[E0308]: mismatched types
  --&gt; /home/lcnr/rust7/src/test/ui/issues/issue-36278-prefix-nesting.rs:16:32
   |
LL |     let y: Box&lt;Ack&lt;[u8   ]&gt;&gt; = x;
   |            -----------------   ^ expected slice `[u8]`, found array `[u8; 0]`
   |            |
   |            expected due to this
   |
   = note: expected struct `Box&lt;P&lt;P&lt;[u8]&gt;&gt;&gt;`
              found struct `Box&lt;P&lt;P&lt;[u8; 0]&gt;&gt;&gt;`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0308`.
</code></pre></div>



<a name="214352084"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214352084" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214352084">(Oct 23 2020 at 18:52)</a>:</h4>
<p>which is weird... we shouldn't really touch this</p>



<a name="214352140"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214352140" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214352140">(Oct 23 2020 at 18:52)</a>:</h4>
<p>Mhm, I can't immediately see what would be causing that.</p>



<a name="214352603"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214352603" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214352603">(Oct 23 2020 at 18:56)</a>:</h4>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="c1">// check-pass</span>

<span class="k">pub</span><span class="w"> </span><span class="k">struct</span> <span class="nc">A</span><span class="o">&lt;'</span><span class="na">a</span><span class="o">&gt;</span><span class="p">(</span><span class="o">&amp;'</span><span class="na">a</span><span class="w"> </span><span class="p">());</span><span class="w"></span>

<span class="k">impl</span><span class="o">&lt;'</span><span class="na">a</span><span class="o">&gt;</span><span class="w"> </span><span class="n">A</span><span class="o">&lt;'</span><span class="na">a</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">const</span><span class="w"> </span><span class="n">N</span>: <span class="kt">usize</span> <span class="o">=</span><span class="w"> </span><span class="mi">68</span><span class="p">;</span><span class="w"></span>

<span class="w">    </span><span class="k">pub</span><span class="w"> </span><span class="k">fn</span> <span class="nf">foo</span><span class="p">(</span><span class="o">&amp;</span><span class="bp">self</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="kd">let</span><span class="w"> </span><span class="n">_b</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[</span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="bp">Self</span>::<span class="n">N</span><span class="p">];</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>

<span class="k">fn</span> <span class="nf">main</span><span class="p">()</span><span class="w"> </span><span class="p">{}</span><span class="w"></span>
</code></pre></div>

<p>goes from no warnings to hard error</p>



<a name="214352720"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214352720" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214352720">(Oct 23 2020 at 18:57)</a>:</h4>
<p>have to think about that one for a bit, it really feels like we should keep supporting this</p>



<a name="214352784"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214352784" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214352784">(Oct 23 2020 at 18:58)</a>:</h4>
<p>maybe special case lt in self params in repeat expressions</p>



<a name="214352841"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214352841" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214352841">(Oct 23 2020 at 18:58)</a>:</h4>
<p>considering that they seem to work on stable, not sure about that</p>



<a name="214352928"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214352928" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214352928">(Oct 23 2020 at 18:59)</a>:</h4>
<p>I don't expect that to current work even without lazy normalisation.</p>



<a name="214352932"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214352932" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214352932">(Oct 23 2020 at 18:59)</a>:</h4>
<p>Or is that what you mean?</p>



<a name="214353016"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214353016" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214353016">(Oct 23 2020 at 19:00)</a>:</h4>
<p>it does work rn because we supply the parent generics in repeat expressions</p>



<a name="214353124"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214353124" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214353124">(Oct 23 2020 at 19:00)</a>:</h4>
<p>Oh wait, this is after <a href="https://github.com/rust-lang/rust/pull/78224">https://github.com/rust-lang/rust/pull/78224</a>.</p>



<a name="214353150"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214353150" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214353150">(Oct 23 2020 at 19:01)</a>:</h4>
<p>no it's not</p>



<a name="214353161"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214353161" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214353161">(Oct 23 2020 at 19:01)</a>:</h4>
<p>this works on the current stable</p>



<a name="214353176"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214353176" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214353176">(Oct 23 2020 at 19:01)</a>:</h4>
<p>but does not work with <code>min_const_generics</code></p>



<a name="214353188"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214353188" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214353188">(Oct 23 2020 at 19:01)</a>:</h4>
<p>Right, that's what I meant, sorry.</p>



<a name="214353561"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214353561" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214353561">(Oct 23 2020 at 19:04)</a>:</h4>
<p>Are you currently running the entire test suite with <code>min_const_generics</code> enabled and lazy normalisation, or just the former?</p>



<a name="214353581"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214353581" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214353581">(Oct 23 2020 at 19:05)</a>:</h4>
<p>both rn, can try with only <code>min_const_generics</code> later</p>



<a name="214354055"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214354055" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214354055">(Oct 23 2020 at 19:09)</a>:</h4>
<p>so yeah, these are the remaining bugs I could find</p>



<a name="214354083"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214354083" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214354083">(Oct 23 2020 at 19:09)</a>:</h4>
<p>also lazy norm error messages are bad <a href="https://play.rust-lang.org/?version=nightly&amp;mode=debug&amp;edition=2018&amp;gist=23be486800280a88ed1f2211a519938e">https://play.rust-lang.org/?version=nightly&amp;mode=debug&amp;edition=2018&amp;gist=23be486800280a88ed1f2211a519938e</a></p>



<a name="214354141"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214354141" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214354141">(Oct 23 2020 at 19:10)</a>:</h4>
<p>time to try only stabilizing <code>min_const_generics</code></p>



<a name="214355860"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214355860" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214355860">(Oct 23 2020 at 19:27)</a>:</h4>
<p><span class="user-mention silent" data-user-id="216206">lcnr</span> <a href="#narrow/stream/260443-project-const-generics/topic/test.20coverage/near/214352603">said</a>:</p>
<blockquote>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="c1">// check-pass</span>

<span class="k">pub</span><span class="w"> </span><span class="k">struct</span> <span class="nc">A</span><span class="o">&lt;'</span><span class="na">a</span><span class="o">&gt;</span><span class="p">(</span><span class="o">&amp;'</span><span class="na">a</span><span class="w"> </span><span class="p">());</span><span class="w"></span>

<span class="k">impl</span><span class="o">&lt;'</span><span class="na">a</span><span class="o">&gt;</span><span class="w"> </span><span class="n">A</span><span class="o">&lt;'</span><span class="na">a</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">const</span><span class="w"> </span><span class="n">N</span>: <span class="kt">usize</span> <span class="o">=</span><span class="w"> </span><span class="mi">68</span><span class="p">;</span><span class="w"></span>

<span class="w">    </span><span class="k">pub</span><span class="w"> </span><span class="k">fn</span> <span class="nf">foo</span><span class="p">(</span><span class="o">&amp;</span><span class="bp">self</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="kd">let</span><span class="w"> </span><span class="n">_b</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[</span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="bp">Self</span>::<span class="n">N</span><span class="p">];</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>

<span class="k">fn</span> <span class="nf">main</span><span class="p">()</span><span class="w"> </span><span class="p">{}</span><span class="w"></span>
</code></pre></div>

<p>goes from no warnings to hard error</p>
</blockquote>
<p>wait, I think <a href="https://github.com/rust-lang/rust/issues/78224">#78224</a> actually fixes this</p>



<a name="214355938"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214355938" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214355938">(Oct 23 2020 at 19:28)</a>:</h4>
<p>that accepts arbitrary <code>Self</code> params in repeat expressions</p>



<a name="214355986"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214355986" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214355986">(Oct 23 2020 at 19:28)</a>:</h4>
<p>really should use the most recent state when testing stuff like this</p>



<a name="214356482"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214356482" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214356482">(Oct 23 2020 at 19:33)</a>:</h4>
<p>good news, ui tests with just <code>min_const_generics</code> should all be as expected after <a href="https://github.com/rust-lang/rust/issues/78224">#78224</a></p>



<a name="214356626"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214356626" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214356626">(Oct 23 2020 at 19:34)</a>:</h4>
<p>looking at <code>lazy_normalization_consts</code> impact on both error quality and that weird unsize coercion error I am in favor of stabilizing without it</p>



<a name="214356705"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214356705" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214356705">(Oct 23 2020 at 19:35)</a>:</h4>
<p>It could be possible to stabilise <code>lazy_normalisation_consts</code> after <code>min_const_generics</code> but before <code>const_generics</code>, once we've addressed those issues.</p>



<a name="214356792"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214356792" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214356792">(Oct 23 2020 at 19:36)</a>:</h4>
<p>const generics really doesn't add too much tbh <span aria-label="laughing" class="emoji emoji-1f606" role="img" title="laughing">:laughing:</span> iirc only more possible types</p>



<a name="214356818"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214356818" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214356818">(Oct 23 2020 at 19:37)</a>:</h4>
<p>(and a lot of groundwork for <code>const_evaluatable_checked</code>)</p>



<a name="214356912"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214356912" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214356912">(Oct 23 2020 at 19:37)</a>:</h4>
<p>but yeah, I think it does make a lot of sense to work on <code>lazy_normalization_consts</code> pretty much directly after stabilizing <code>min_const_generics</code> <span aria-label="thumbs up" class="emoji emoji-1f44d" role="img" title="thumbs up">:thumbs_up:</span></p>



<a name="214357069"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214357069" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214357069">(Oct 23 2020 at 19:39)</a>:</h4>
<p>There are still quite a few remaining bugs with <code>const_generics</code> in full, though, and also some design work to be done.</p>



<a name="214357234"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214357234" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214357234">(Oct 23 2020 at 19:41)</a>:</h4>
<p>val tree for example</p>



<a name="214357331"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214357331" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214357331">(Oct 23 2020 at 19:42)</a>:</h4>
<p>and the <code>ANON_CONST</code> lt fun</p>



<a name="214357394"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214357394" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214357394">(Oct 23 2020 at 19:43)</a>:</h4>
<p><span class="user-mention silent" data-user-id="216206">lcnr</span> <a href="#narrow/stream/260443-project-const-generics/topic/test.20coverage/near/214356792">said</a>:</p>
<blockquote>
<p>const generics really doesn't add too much tbh <span aria-label="laughing" class="emoji emoji-1f606" role="img" title="laughing">:laughing:</span> iirc only more possible types</p>
</blockquote>
<p><em>in terms of features, it does add a lot of complexity</em></p>



<a name="214357509"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214357509" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214357509">(Oct 23 2020 at 19:44)</a>:</h4>
<p>There's a reason <code>min_const_generics</code> is being stabilised first :P</p>



<a name="214507432"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214507432" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214507432">(Oct 25 2020 at 19:26)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/260443-project-const-generics/topic/test.20coverage/near/214339615">said</a>:</p>
<blockquote>
<p><span class="user-mention silent" data-user-id="216206">lcnr</span> <a href="https://hackmd.io/WnFmN4MjRCqAjGmYfYcu2A">hackmd url</a></p>
</blockquote>
<p>i am currently thinking about how we can best split this up</p>



<a name="214507681"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214507681" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214507681">(Oct 25 2020 at 19:32)</a>:</h4>
<ul>
<li>rustdoc</li>
</ul>
<p>One interested fairly self-contained topic is probably <code>rustdoc</code>. We pretty much want tests for values <code>7</code>, params <code>N</code>, associated consts <code>fn test() -&gt; [u8; Type::ASSOC]</code> and more complex expressions (<code>ConstKind::Unevaluated</code>) <code>3 + 4</code> in different positions, like ret + arg impl trait, async fn ret + impl position, type alias,  and defined inside of macros. Probably also nice to test reexports and usage of associated consts defined in a different crate.</p>



<a name="214507698"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214507698" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214507698">(Oct 25 2020 at 19:32)</a>:</h4>
<p>Consider also adding one test for a constant which contains a lot of weird stuff, like struct definitions and so on to see how that looks</p>



<a name="214507762"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214507762" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214507762">(Oct 25 2020 at 19:34)</a>:</h4>
<ul>
<li>default values for const parameters should error</li>
</ul>
<p>I think this only needs one test which tries to use something like <code>const N: usize = 23</code> and <code>const N = 27: usize</code> to check that the error is at least somewhat readable</p>



<a name="214507792"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214507792" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214507792">(Oct 25 2020 at 19:35)</a>:</h4>
<ul>
<li>ordering of const parameters (only after types)</li>
</ul>
<p><span class="user-mention" data-user-id="326189">@jknodt</span> already added quite a few tests for that, so this is probably already good enough. At least I can't think of anything missing here</p>



<a name="214507899"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214507899" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214507899">(Oct 25 2020 at 19:37)</a>:</h4>
<ul>
<li>supertraits + dyn type upcasting with supertraits</li>
</ul>
<p>This requires some knowledge about how all of this should work but is probably quite interesting to think about.</p>



<a name="214508017"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214508017" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214508017">(Oct 25 2020 at 19:39)</a>:</h4>
<ul>
<li>trait methods <code>trait Foo&lt;const C&gt; { fn bar&lt;const D&gt;() }</code></li>
</ul>
<p>I think that's already fairly well tested thanks to the interaction with type dependent paths, at least I can't think of anything specific we are still missing here</p>



<a name="214508085"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214508085" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214508085">(Oct 25 2020 at 19:41)</a>:</h4>
<ul>
<li>associated type bounds</li>
</ul>
<p>hopefully one run-pass and one or two compile fail tests are enough here</p>



<a name="214508172"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214508172" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214508172">(Oct 25 2020 at 19:43)</a>:</h4>
<ul>
<li>invalid bool and char bit-pattern</li>
</ul>
<p>A test which tries to for example use <code>7</code> as a bool and <code>0xFF</code> as a char</p>



<a name="214508274"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214508274" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214508274">(Oct 25 2020 at 19:45)</a>:</h4>
<ul>
<li>macros</li>
</ul>
<p>hopefully fairly self-contained, try defining a <code>#[macro_export]</code> macro inside of a const (which can be inside of async fn or impl trait) don't have anything to add for the other subtopics</p>



<a name="214508449"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214508449" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214508449">(Oct 25 2020 at 19:49)</a>:</h4>
<p>I think these are the more self-contained topics, for everything else it's probably easiest for someone - I expect and want this to be me - to just spend a few hours mixing stuff until it either breaks or there is a high confidence that it does not break.</p>



<a name="214508469"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214508469" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214508469">(Oct 25 2020 at 19:49)</a>:</h4>
<p>if someone wants to work on one of these subtopics, or even one not explicitly listed here, please do <span aria-label="heart" class="emoji emoji-2764" role="img" title="heart">:heart:</span> please write a short message here that you are working on one of these things</p>



<a name="214614546"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214614546" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ethan Brierley <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214614546">(Oct 26 2020 at 18:27)</a>:</h4>
<p>I would like to help with that :).</p>
<ul>
<li>default values for const parameters should error</li>
</ul>
<p>looks like a simple one I could start with.  I have never created a ui test so it will take some working out.</p>



<a name="214624351"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214624351" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214624351">(Oct 26 2020 at 19:50)</a>:</h4>
<p><a href="https://rustc-dev-guide.rust-lang.org">https://rustc-dev-guide.rust-lang.org</a> is invaluable for those.</p>



<a name="214640639"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214640639" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214640639">(Oct 26 2020 at 22:21)</a>:</h4>
<p>especially <a href="https://rustc-dev-guide.rust-lang.org/tests/intro.html">https://rustc-dev-guide.rust-lang.org/tests/intro.html</a></p>



<a name="214666743"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214666743" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Hameer Abbasi <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214666743">(Oct 27 2020 at 07:11)</a>:</h4>
<p>I just said this to <span class="user-mention" data-user-id="216206">@lcnr</span> privately, but maybe it makes sense to put it here: It'd be nice to take the HackMD and stick it in a tracking issue somewhere.</p>



<a name="214672603"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214672603" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214672603">(Oct 27 2020 at 08:42)</a>:</h4>
<p>yeah, good idea <span aria-label="thumbs up" class="emoji emoji-1f44d" role="img" title="thumbs up">:thumbs_up:</span> opened <a href="https://github.com/rust-lang/rust/issues/78433">#78433</a>. now if someone wants to work on one of these topics we can just edit the issue description</p>



<a name="214894896"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214894896" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Andrés Correa Casablanca <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214894896">(Oct 28 2020 at 20:42)</a>:</h4>
<p>Hi, is there any way I could contribute (as a "newbie") to these testing efforts?</p>
<p>EDIT: For now I'll keep reading this guide that I just found ^^U : <a href="https://rustc-dev-guide.rust-lang.org/">https://rustc-dev-guide.rust-lang.org/</a></p>



<a name="214901166"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214901166" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> jknodt <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214901166">(Oct 28 2020 at 21:40)</a>:</h4>
<p>yuh, if you check out <a href="https://github.com/rust-lang/rust/issues/78433">#78433</a>, you can see which parts of code need to be tested. If you look at some of the linked PRs as well you can see where the necessary changes need to be made (mainly in <code>src/test/ui/const-generics/min_const_generics</code>). Once you have something you can run tests with <code>./x.py test src/test/ui/const-generics/min_const_generics</code>, and all these steps would require rust to be setup as according to the dev guide you linked</p>



<a name="214903688"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/test%20coverage/near/214903688" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/test.20coverage.html#214903688">(Oct 28 2020 at 22:08)</a>:</h4>
<p>what <span class="user-mention silent" data-user-id="326189">jknodt</span> said, also,  feel free to ask either here or in pms if you ever feel like you are stuck somewhere</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>